package view;

import java.awt.*;
import javax.swing.*;

import model.ModeloObservable;
import model.Posicion;

public class VentanaTextoEstadoJuego extends JFrame {

	private static final long serialVersionUID = 3912019136015352983L;
	
    public VentanaTextoEstadoJuego() {
    	
    	this.setTitle("Ejemplo de MVC | Juego");
    	
    	Container general = getContentPane();
    	general.setLayout(new FlowLayout());
    	   	
    	JPanel panel1 = new JPanel();
    	panel1.setLayout(new FlowLayout());
    	
        panel1.add(new JLabel("Hola Mundo"));
        JTextField texto = new JTextField(20);
        panel1.add(texto);
        JButton boton = new JButton("Saludar");
        boton.addActionListener(new EventoBotonPulsado(texto));
        panel1.add(boton);
        
        
        JPanel panel2 = new JPanel();
        GridLayout gl = new GridLayout(4,3);
        gl.setHgap(5); gl.setVgap(4);
        panel2.setLayout(gl);
        
        for (int i = 1; i <= 9; i++){
        	panel2.add(new JButton(String.valueOf(i)));
        }
        panel2.add(new JButton("*"));
        panel2.add(new JButton("0"));
        panel2.add(new JButton("#"));
        
        JPanel panelFecha = new JPanel();
        panelFecha.setLayout(new FlowLayout());
        panelFecha.add(new JTextField(2));
        panelFecha.add(new JLabel("/"));
        panelFecha.add(new JTextField(2));
        panelFecha.add(new JLabel("/"));
        panelFecha.add(new JTextField(2)); 
        
        general.add(panel1, BorderLayout.NORTH);
        general.add(panel2, BorderLayout.CENTER);
        general.add(panelFecha, BorderLayout.SOUTH);
    }

}
